<!--
 * Created by PhpStorm.
 * 版权所有: 2019~2022 [ hhygyl ]
 * Date: 2019/8/15-10:00
 * Link: http://luckyadmin.luckyhhy.cn
 * FileName: show.html
 *-->

{/*引入基类模板*/}

{extend name='public/base' /}

{block name="css"}
<link type="text/css" rel="stylesheet" href="{__HOME_PATH}css/chanyan.css">
<style>
    .gbox { padding: 20px; overflow: hidden; }
    .gbox p { margin-bottom: 10px }
    p.fbtime { color: #000; }
    .fbtime span { float: right; color: #999; font-size: 12px; }
    p.fbinfo { margin: 10px 0; }
    .fb ul {
        margin: 1px 0px;
        border-bottom: #ececec 1px solid;
    }
    .hf ul { padding: 5px 10px; background: #f9f9f9; }
    .hf { margin: 0 10px; padding-bottom: 10px; border-bottom: #dedddd 1px dashed; }
    textarea#lytext { width: 100%; }
    .zzhf{word-wrap : break-word;}
    .amg{width: 60px;height: 60px;border-radius: 50%; float: left;}
</style>

{/block}

{block name="content"}
<article>
    <h1 class="t_nav">
         {$data.navigate_id|brand_nav}
        <a href="/" class="n1">网站首页</a><a href="javascript:" class="n2">{$data.navigate_id|get_nav_name}</a></h1>
    <div class="infosbox">
        <div class="newsview">
            <h3 class="news_title">{$data.title}</h3>
            <div class="bloginfo">
                <ul>
                    <li class="author">
                        <a href="javascript:void">{$data.author}</a>
                    </li>
                    <li class="lmname">
                        <a href="javascript:void">{$data.navigate_id|get_nav_name}</a>
                    </li>
                    <li class="timer">{$data.create_time|friend_time}</li>
                    <li class="view">{$data.hits} 次阅读</li>
                    <li class="like">{$data.zan}</li>
                    <li> <span class="layui-badge layui-bg-warm" style="float: right;">{$data.source}</span></li>
                </ul>
            </div>
            <!--文章标签-->
            {notempty name="data.tags"}
            <?php  $tag_arr=@explode(',',$data['tags']);?>
            <div class="tags">
                {volist name="tag_arr" id="t"}
                <a href="javascript:" >{$t}</a> &nbsp;
                {/volist}
            </div>
            {/notempty}
            <!--文章标签结束-->

            <div class="news_about">
                <!-- 内容简介开始-->
                {$data.description}
                <!-- 内容简介结束-->
            </div>

            <div class="news_con">
                <!-- 内容开始-->

                 {$data.content}

                <!-- 内容结束-->

                <!--文章分享-->
                {include file="public/share" /}

            </div>

        </div>

        <!--文章点赞打赏-->
        {include file="public/zan" /}


        <div class="nextinfo">
            <p>上一篇：

                <a href="{$data.prev.url}">{$data.prev.title}</a>
            </p>
            <p>下一篇：
                <a href="{$data.next.url}">{$data.next.title}</a>
            </p>
        </div>

        <div class="otherlink">
            <h2>相关文章</h2>
            <ul>
                {lv:article  id="da" limit="6" cate_id=$data.navigate_id}
                <li><i>{$key+1}</i><a href="{$da.url}" title="{$da.title}">{$da.title|title_str_cut="80"}</a></li>
                {/lv:article}
            </ul>
        </div>


        <div class="news_pl">
            <h2>文章评论</h2>
            <!--发表留言-->
            <a  name="tosaypl"></a >
            <div class="comment comment-main" >
                <fieldset class="layui-elem-field">
                    <legend>请君开口</legend>
                    <div class="layui-field-box">
                        <form class="commentform" id="comment-form-article">
                            <div id="user-name-content" class="user-name-content">欢迎您：<span class="iconfont"></span> <b id="user-name" style="color:#fa889b;"></b></div>
                            <div style="display: flex">
                                <img id="avatar" src="{__HOME_PATH}images/avatar.jpg" height="42" width="42" class="avatar-42">
                                <div style="width: 100%; margin-left: 5px;">
                                    <div class="form-group" id="user-info" style="overflow: hidden;">
                                        <input type="hidden" id="article_id" name="article_id" value="{$data.id}" >
                                        <input type="hidden" id="pid" name="pid" value="0" >
                                        <input type="hidden" id="image"  >
                                        <input type="text"  id="qqq"  name="qq" placeholder="QQ（可获取头像和昵称）">
                                        <input type="text"  id="username" placeholder="自动获取" autocomplete="off" readonly="">
                                    </div>
                                    <div class="comment-textarea" style="margin-top: 5px">
                                        <textarea id="comment-textarea" name="content" placeholder="既然来了就说点啥呗" class="" style="height: 50px;"></textarea>
                                    </div>
                                </div>
                            </div>
                            <ul class="comment-submit">
                                <button id="submitCommentBtn-article" type="button" class="commentbutton">提交</button>
                            </ul>
                        </form>
                    </div>
                </fieldset>
            </div>

            <script >


            </script >

            <ul>
                <div class="gbko">
                    <div class="changyan">
                    <!--PC版-->
                    <div id="SOHUCS">
                        <div id="SOHU_MAIN">
                        <div node-type="module-cmt-list" class="module-cmt-list section-list-w">
                            <!-- 评论列表  S -->
                            <!-- 最新评论 -->
                           <div class="list-block-gw list-newest-w">
                               <div node-type="cmt-list-title" class="block-title-gw">
                                   <ul class="clear-g">
                                       <li>
                                           <div class="title-name-gw title-name-bg">
                                               <div class="title-name-gw-tag"></div>最新评论（{$count}）</div>
                                       </li>
                                   </ul>
                               </div>

                               <div node-type="cmt-list" >

                                   {volist name="comment" id="v" empty="暂时没有评论"}

                                   <div class="clear-g block-cont-gw">
                                       <div class="cont-head-gw">
                                           <div class="head-img-gw">
                                               <a node-type="photo">
                                                   <div class="img-corner"></div>
                                                   <img src="{$v.image}" width="42" height="42">
                                               </a>
                                           </div>
                                       </div>
                                       <div class="cont-msg-gw">
                                           <div class="msg-wrap-gw">
                                               <div class="wrap-user-gw global-clear-spacing">
                                                   <span class="user-time-gw">{$v.create_time|friend_time}</span>
                                                   <span node-type="nickname" class="user-name-gw"><a>{$v.users_name}</a></span>
                                                   <span class="user-address-gw"> <a href="http://www.ip138.com/ips138.asp?ip={$v.ip}&action=2" >[{$v.ip}]</a ></span>
                                               </div>

                                                <?php  $ping=comment_article($v['id']);?>

                                               {if !empty($ping)}
                                               <div class="wrap-issue-gw">
                                                   <div class="docs-card">@{$ping.id|get_users_ById} 的回复：{$ping.content}</div>
                                                   <p class="issue-wrap-gw"><span class="wrap-word-gw" style="color: #0f89a9">{$v.content}</span></p>
                                               </div>
                                               {else /}
                                               <div class="wrap-issue-gw">
                                                   <p class="issue-wrap-gw"><span class="wrap-word-gw" >{$v.content}</span></p>
                                               </div>

                                               {/if}


                                               <div node-type="btns-bar" class="clear-g wrap-action-gw">
                                                   <div node-type="action-click-gw" class="action-click-gw global-clear-spacing">
                                                       <i class="gap-gw"></i>
                                                       <span node-type="support" class="click-ding-gw">
                                                           <a href="JavaScript:" onclick="article_ping(this)" data-id="{$v.id}">
                                                               <i class="icon-gw icon-ding-bg"></i>
                                                               <em id="article_zan_{$v.id}" class="icon-name-bg">{$v.zan}</em>
                                                           </a>
                                                       </span> <i class="gap-gw"></i>

                                                       <a onclick="replay_comment(this)" data-name="{$v.users_name}" data-id="{$v.id}" href="#tosaypl">回复</a>
                                                       <i class="gap-gw"></i>
                                                   </div>
                                               </div>
                                           </div>

                                       </div>
                                   </div>

                                   {/volist}



                               </div>
                           </div>

                        </div>
                        </div>
                    </div>
                </div>
                </div>



                <!--分页-->
                <div style="margin: 30px 0;height:30px;text-align: center;line-height: 30px;" >
                    {$page}
                </div>

            </ul>
        </div>
    </div>


    {include file="public/right" /}

    <script >
        $(".news_con img").click(function () {
            layer.photos({
                photos: {
                    title: "图片详细",
                    data: [{
                        src: $(this).attr("src")
                    }]
                },
                shade: .01,
                closeBtn: 1,
                anim: 5
            })
        });
    </script >


</article>

    {/block}


